#ifndef _FILE_READER_H
#define _FILE_READER_H

#ifdef _WIN32
#pragma once
#endif

/**
 * Reads binary data from a specified file.
 *
 * 29/02/2012 - Steven Hartin - Created the class structure, implemented from 
 *                              UML
 */

#include <iostream>
#include <fstream>
#include <string>

#include "entity.h"

using std::ifstream;
using std::string;

class CFileReader
{
public:
    CFileReader(const string &szFilePath);
    CFileReader();

    ~CFileReader();

    void setFilePath(const string &szFilePath);

    short int readShort();
    long int readLong();
    bool readBool();
    string readString(int nCount);
    char readChar();
    float readFloat();
    double readDouble();
    ENTITY_ID readEntityId();

private:
    string m_szFilePath;
    ifstream m_FileStream;

    void _openFile();
    void _closeFile();
};

#endif